package com.bw.controller;

import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bw.aop.MyLog;
import com.bw.common.Result;
import com.bw.entity.Bing;
import com.bw.entity.SysOrder;
import com.bw.entity.SysUser;
import com.bw.form.UserQueryForm;
import com.bw.service.SysOrderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.List;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * (sys_order)表控制层
 *
 * @author xxxxx
 */
@RestController
public class SysOrderController {
    /**
     * 服务对象
     */
    @Resource
    private SysOrderService sysOrderService;

    @Autowired
    ThreadPoolExecutor threadPoolExecutor;

    /**
     * 列表
     */
    @RequestMapping("/getReportPage")
    public IPage<SysOrder> getUserPage(Page page, UserQueryForm query) {

        return sysOrderService.getReportPage(page,query);

    }
    /**
     * 列表
     */
    @RequestMapping("/getEcharts")
    public Result<List<Bing>> getEcharts(UserQueryForm query) {

        return Result.ok(sysOrderService.getEcharts(query));

    }

}
